1. Field of the Invention
The present invention relates to a tone correction apparatus for digital color image signals, and more particularly to a tone correction apparatus suitable for applications to broadcast business and the like which require relatively sophisticated processes.
2. Description of the Related Art
Various techniques of tone correction of color image signals have been known heretofore. Among these techniques, six-color independent tone correction is known.
With this six-color independent tone correction, the chromaticness (color saturation) and chromaticity (hue) of six standard colors, including R (red), Ma (magenta), B (blue), Cy (cyan), G (green), and Ye (yellow), are independently adjusted without changing the white balance, i.e., without coloring an achromatic signal. A specific example of six-color independent tone correction is described in JP-A-3-26658 and JP-A-3-272294.
An example of conventional six-color independent tone correction will be described.
FIG. 1 shows an example of a conventional six-color independent tone correction apparatus.
In FIG. 1, three terminals R.sub.IN, G.sub.IN, and B.sub.IN are input terminals to which three R, G, and B digital signals constituting a color image signal to be tone corrected are supplied. R.sub.OUT, G.sub.OUT, and B.sub.OUT are output terminals from which corrected R, G, and B signals are output.
Three R, G, and B digital signals supplied to the input terminal R.sub.IN, G.sub.IN, and B.sub.IN are input to comparators 1 to 3 which compare levels of R and G signals, of G and B signals, and of B and R signals. The comparators 1 to 3 output signals representative of the comparison results. A hue area determination unit 4 sequentially judges as shown in FIG. 4 a hue area of each input signal in accordance with the comparison results of the comparators 1 to 3.
FIG. 2 is a conceptual diagram showing hue areas. In this diagram, an input signal is classified into six hue areas which are partitioned by using axes or straight lines extending from the center to respective standard colors, as standard axes (standard lines). In accordance with the comparison results of the comparators 1 to 3, the hue area determination unit 4 discriminates between a color signal having a highest signal level, a color signal having a lowest signal level, and a color signal having a signal level or intermediate signal level between the highest and lowest signal levels. Since there are color signals having the same signal level, the priority order is set between R, G, and B to judge the hue area. In this example, the priority is set in the order of R, G, and B.
The hue of an input color image signal is judged whether it belongs to which hue area among the six hue areas, in accordance with a combination of the kind of a color signal having the highest level and the kind of a color signal having the second highest level.
FIG. 5 is a flow chart illustrating the operation of the apparatus having the structure shown in FIG. 1. The operation of the apparatus will be described with reference to this flow chart.
The hue area determination unit 4 executes the processes at Step 501 to 504 shown in FIG. 5. Specifically, in accordance with the signals representative of the comparison results of the comparators 1 to 3, the hue area determination unit 4 detects the kind of a color signal having the highest level among the three R, G, and B color signals and the kind of a color signal having the second highest level. There are six combinations of kinds of these color signals, each combination being composed of a primary color of a color signal having the highest level and a complementary color between the color signal having the highest level and a color signal having a second highest level. These six combinations include (R:Ma), (B:Ma), (B:Cy), (G:Cy), (G:Ye), and (R:Ma). In accordance with the detection results of these levels, it can be judged whether an input image signal belongs to which hue area shown in FIG. 2.
First, a color signal having the highest level and a color signal having the second highest level are detected. Assuming that the relationship between levels of color signals is as shown in FIG. 3, the color signal having the highest level is R and the color signal having the second highest level is G.
Next, by using these determination results, a table stored in the hue area determination unit 4 shown in FIG. 4 is searched. In this example, since the color signal having the highest level is R and the color signal having the second highest level is G, the level relationship is R&gt;G&gt;B which corresponds to the relationship at the second lowest row of the table shown in FIG. 4. Therefore, the hue area of this input signal corresponds to the 6th area shown in FIG. 2.
Similarly, if the level relationship of an input signal is R&gt;B&gt;G, the hue area of the input signal corresponds to the 1st area, if B&gt;G&gt;R, then the 3rd area, if G&gt;B&gt;R, then the 4th area, and if G&gt;R&gt;B, then the 5th area.
In the above manner, the hue area determination unit 4 sequentially judges the hue area of each input digital signal, and supplies a signal 100 representative of the determination result to a primary/complementary color component calculator circuit 5, to a constant selector circuit 6, and to a data selector circuit 11.
In response to the signal 100 from the hue area determination unit 4, the primary/complementary color component calculator circuit 5 sequentially calculates primary and complementary color components of an input digital signal. The primary/complementary color component calculator circuit 5 includes selectors 51 to 53 and subtractors 55 and 56.
The selector 51 selects a color signal having the highest level among R, G, and B signals in accordance with the signal 100 representative of the determination result supplied from the hue area determination unit 4, and supplies the selected color signal to the subtractor 55. Namely, if the determination result indicated by the signal 100 from the hue area determination unit 4 is 1st, 2nd, 3rd, 4th, 5th, or 6th area, the selector 51 selects R, B, B, G, G, or R signal, respectively.
The selector 52 selects a color signal having the intermediate level among R, G, and B signals in accordance with the signal 100 representative of the determination result supplied from the hue area determination unit 4, and supplies the selected color signal to an inverted input terminal of the subtractor 55 and a non-inverted input terminal of the subtractor 56. Namely, if the determination result indicated by the signal 100 from the hue area determination unit 4 is 1st, 2nd, 3rd, 4th, 5th, or 6th area, the selector 52 selects B, R, G, B, R, or G signal, respectively.
The selector 53 selects a color signal having the lowest level among R, G, and B signals in accordance with the signal 100 representative of the determination result supplied from the hue area determination unit 4, and supplies the selected color signal to the inverted input terminal of the subtractor 56. Namely, if the determination result indicated by the signal 100 from the hue area determination unit 4 is 1st, 2nd, 3rd, 4th, 5th, or 6th area, the selector 53 selects G, G, R, R, B, or B signal, respectively.
In the above manner, as shown in Steps 504 to 514 in FIG. 5, the primary/complementary color component calculator circuit 5 calculates the primary color component level and the complementary color component level as shown in FIG. 3 in accordance with each determination result indicated by the signal 100 supplied from the hue area determination unit 4. The primary color component level is the level of the color signal having the highest level subtracted by the level of the color signal having the second highest level, and the complementary color component level is the level of the color signal having the second highest level subtracted by the level of the color signal having the lowest level.
The color having the highest level corresponds to the primary color, and the components of the color signal having the lowest level correspond to the white components. Each complementary color can be determined from the information of the color having the highest level and the color having the lowest level. Accordingly, as shown in FIG. 4, the primary and complementary color components can be determined.
In the example shown in FIG. 3, since R has the highest level and G has the intermediate level, R constitutes the primary color components and Ye (yellow) which is an intermediate hue between R and G constitutes the complementary components. The quantity of the primary color components is R-G, the quantity of the complementary color components is G-R, and the quantity of B having the lowest level is the quantity of the white color components.
In the table shown in FIG. 4, although the lowest level of each color signal is not necessary for the determination of a hue area, it is necessary for the calculation of the complementary color components. This is the reason why the lowest level is written in the table of FIG. 4.
The signal representative of the determination result of a hue area given by the hue area determination unit 4 is also supplied to the constant selector circuit 6 which selects a specific gain constant in accordance with the determination result. The selected gain constant is supplied to multipliers 210 to 213. The primary and complementary color component quantities calculated by the calculator circuit 5 are multiplied by selected gain constants to correct the primary and complementary components.
For this correction, the constant selector circuit 6 is preset with specific gain constants corresponding to the 1st to 6th hue areas.
The constant selector circuit 6 includes registers 218 to 229 and selectors 214 to 217.
As described above, the subtractor 55 outputs a signal representative of the level of the primary color components of an input color image signal to supply it to two multipliers 210 and 211.
The other subtractor 56 outputs a signal representative of the level of the complementary color components of an input color image signal to supply it to two multipliers 212 and 213.
In accordance with the color signal having the highest level among R, G, and B signals which color signal corresponds to the determination result by the hue area determination unit 4, the selector 214 selects one of the registers 218 to 220 which store chromaticness adjustment coefficients K1 to K3 to be used for the color signal having the highest level. Similarly, in accordance with the color signal having the highest level among R, G, and B signals which color signal corresponds to the determination result by the hue area determination unit 4, the selector 215 selects one of the registers 218 to 220 which store chromaticness adjustment coefficients K4 to K6 to be used for the color signal having the highest level. The coefficients read from the registers selected by the selectors 214 and 215 are supplied to the multipliers 210 and 211.
In accordance with a complementary color (Cy for R, Ma for G, and Ye for B) not containing the color signal having the lowest level among R, G, and B signals which color signal corresponds to the determination result by the hue area determination unit 4, the selector 216 selects one of the registers 224 to 226 which store chromaticness adjustment coefficients K7 to K9 to be used for the complementary color. Similarly, in accordance with a complementary color identified from the determination result by the hue area determination unit 4, the selector 217 selects one of the registers 227 to 229 which store chromaticness adjustment coefficients K10 to K12 to be used for the complementary color. The coefficients read from the registers selected by the selectors 214 and 215 are supplied to the multipliers 212 and 213.
As above, the multiplier 210 outputs a signal representative of the primary color components multiplied by the chromaticness adjustment coefficient corresponding to this primary color, and the multiplier 211 outputs a signal representative of the primary color components multiplied by the chromaticness adjustment coefficient corresponding to this primary color. On the other hand, the multiplier 212 outputs a signal representative of the complementary color components multiplied by the chromaticness adjustment coefficient corresponding to this complementary color, and the multiplier 213 outputs a signal representative of the complementary color components multiplied by the chromaticness adjustment coefficient corresponding to this complementary color.
Of these outputs, an output of the multiplier 210 is supplied to a selector 231 constituting the data selector circuit 11 which is controlled by the hue area determination unit 4. The output of the multiplier 231 is added, via one of adder circuits 33 to 35 selected by the selection operation of the selector 231, to one of the original R, G, and B signals supplied from a corresponding one of the input terminals R.sub.IN, G.sub.IN, and B.sub.IN and judged to be the primary color by the hue area determination unit 4.
An output of the multiplier 211 and a polarity inverted output inverted by an inverter 230 are supplied to the selector 231 constituting the data selector circuit 11 controlled by the hue determination circuit 4. The output of the multiplier 211 and the output of the inverter 230 are added, via two of adder circuits 33 to 35 selected by the selection operation of the selector 231 excepting the adder circuit to which the output of the multiplier 210 is supplied, to two of the original R, G, and B signals supplied from corresponding two of the input terminals R.sub.IN, G.sub.IN, and B.sub.IN excepting the color signal judged to be the primary color by the hue area determination unit 4. In this manner, by changing the coefficients stored in the registers 218 to 223, the chromaticness and hue of each primary color can be independently adjusted as illustrated in FIG. 5.
Specifically, if the hue area of an input signal is in the 1st area, the chromaticness of the primary color can be adjusted as explained at Step 528, and the hue thereof can be adjusted as explained at Step 530. If the hue area of an input signal is in the 6th area, the chromaticness of the primary color can be adjusted as explained at Step 536, and the hue thereof can be adjusted as explained at Step 538. If the hue area of an input signal is in the 4th area, the chromaticness of the primary color can be adjusted as explained at Step 546, and the hue thereof can be adjusted as explained at Step 548. If the hue area of an input signal is in the 5th area, the chromaticness of the primary color can be adjusted as explained at Step 554, and the hue thereof can be adjusted as explained at Step 556. If the hue area of an input signal is in the 3rd area, the chromaticness of the primary color can be adjusted as explained at Step 562, and the hue thereof can be adjusted as explained at Step 564. If the hue area of an input signal is in the 2nd area, the chromaticness of the primary color can be adjusted as explained at Step 570, and the hue thereof can be adjusted as explained at Step 572.
The outputs of the multipliers 212 and 213 are supplied to an adder 239 and a subtractor 240. The adder 239 adds the outputs of the multipliers 212 and 213, and the subtractor 240 subtracts the output of the multiplier 213 from the output of the multiplier 212. The outputs of the adder 239 and the subtractor 240 are supplied to a selector 232, and added to respective ones of R, G, and B signals (R and G for Ye, G and B for Cy, and R and B for Ma) constituting the complementary colors not containing the color signal having the lowest level judged by the hue area determination unit 4, by respective ones of adders 36 to 38.
In this manner, by changing the coefficients stored in the registers 224 to 229, the chromaticness and hue of each complementary color can be independently adjusted as illustrated in FIG. 5.
Specifically, if the hue area of an input signal is in the 1st area, the chromaticness of the complementary color can be adjusted as explained at Step 532, and the hue thereof can be adjusted as explained at Step 534. If the hue area of an input signal is in the 6th area, the chromaticness of the complementary color can be adjusted as explained at Step 540, and the hue thereof can be adjusted as explained at Step 542. If the hue area of an input signal is in the 4th area, the chromaticness of the complementary color can be adjusted as explained at Step 550, and the hue thereof can be adjusted as explained at Step 552. If the hue area of an input signal is in the 5th area, the chromaticness of the complementary color can be adjusted as explained at Step 558, and the hue thereof can be adjusted as explained at Step 560. If the hue area of an input signal is in the 3rd area, the chromaticness of the complementary color can be adjusted as explained at Step 566, and the hue thereof can be adjusted as explained at Step 560. If the hue area of an input signal is in the 2nd area, the chromaticness of the complementary color can be adjusted as explained at Step 574, and the hue thereof can be adjusted as explained at Step 576.
The operation of this conventional example will be described in more detail by using a specific example.
As already described, of the coefficients to be stored in the registers 218 to 229, the coefficients K1 to K3 are used for adjusting the chromaticness of each of R, G, and B primary colors, the coefficients K4 to K6 are used for adjusting the hue of each primary color, the coefficients K7 to K9 are used for adjusting the chromaticness of each of Ye, Cy, and Ma complementary colors, and the coefficients K10 to K12 are used for adjusting the hue of each complementary color.
It is assumed here that the digital color image signal supplied from the input terminals R.sub.IN, G.sub.IN, and B.sub.IN is represented by: EQU R:G:B=0.8:0.4:0.4
The hue area determination unit 4 judges that the colors of the input signal are R and Ma because the R signal level is highest and the G signal level is lowest (in this case, although the levels of the G and B signals are the same, it is judged from the above-described priority order that the G signal level is lowest).
The selectors 51, 52, and 53 select corresponding R, G, and B signals. The subtractor 55 outputs an (R-B) signal having a signal level of 0.4, i.e., the primary signal components R' of the image signal, and supplies it to the multiplier 210. The output of the subtractor 56 has a level of 0, and so the complementary color signal components are not output.
In this case, since the judged color is R, the selectors 214 and 215 select the registers 218 and 221, respectively, which respectively store the coefficients K1 and K2 used for adjusting the chromaticness and hue of R color, respectively. Therefore, the multipliers 210 and 211 output the primary color components multiplied by the R color chromaticness and hue adjusting coefficients, i.e., R.times.K1 signal and R.times.K4 signal.
Further, since the color of the image signal is R, the selector 231 performs a selection operation so that an output of the multiplier 210 is added to the R signal by the adder 33, and an output of the multiplier 211 and an output of the inverter 230 are added to the G and B signals by the adders 34 and 35, respectively.
Therefore, the R signal of the image signal is added with a correction portion which is the primary color signal components R' of the image signal multiplied by the R color chromaticness adjusting coefficient K1, the B signal is added with a correction portion which is the primary color signal components R' multiplied by the R color hue adjusting coefficient K4, and the G signal is subtracted by this correction portion. As a result, R, G, and B signals of the digital color image signal whose chromaticness of the R signal was corrected by the coefficient K1 and hue was corrected by the coefficient K4, are output from the output terminals R.sub.OUT, G.sub.OUT, and B.sub.OUT. With the adjustment using the coefficients K1 and K4, the chromaticness and hue of the R signal can be adjusted independently from other color signals.
It is assumed that a color image signal is next input which has a level ratio of color signals of: EQU R:G:B=0.8:0.8:0.4
The hue area determination unit 4 judges that the colors of the input signal are R and Ye because the R signal level is highest and the B signal level is lowest (in this case, although the levels of the R and G signals are the same, it is judged from the above-described reason that the R signal level is highest).
The selectors 5, 6, and 7 select corresponding R, G, and B signals. The subtractor 56 outputs a (G-B) signal having a signal level of 0.4, i.e., the complementary signal components Ye' of the image signal, and supplies it to the multipliers 212 and 213. The output of the subtractor 55 has a level of 0, and so the primary color signal components are not output.
In this case, since the judged color is Ye, the selectors 216 and 217 select the registers 224 and 227, respectively, which respectively store the coefficients K7 and K10 used for adjusting the chromaticness and hue of Ye color, respectively. Therefore, the multipliers 212 and 213 output the complementary color components multiplied by the Ye color chromaticness and hue adjusting coefficients, i.e., Ye.times.K7 signal and Ye.times.K10 signal.
Further, since the color of the image signal is Ye, the selector 232 performs a selection operation so that an addition result of an output of the multiplier 212 and an output of the multiplier 213 added by the adder 239 is added to the R signal by the adder 36 and so that a subtraction result of an output of the multiplier 213 from an output of the multiplier 212 is added to the G signal by the adder 37.
Therefore, the R signal of the image signal is added with a correction portion which is the complementary color signal components Ye' of the image signal multiplied by the Ye color chromaticness adjusting coefficient K7 and added further to the components Ye' multiplied by the Ye color hue adjusting coefficient K10, the G signal is added with a correction portion which is the complementary color signal components Ye' multiplied by the Ye color hue adjusting coefficient K7 and subtracted further by the components Ye' multiplied by the Ye color hue adjusting coefficient K10. As a result, R, G, and B signals of the digital color image signal whose chromaticness of the Ye color signal was corrected by the coefficient K7 and hue was corrected by the coefficient K10, are output from the output terminals R.sub.OUT, G.sub.OUT, and B.sub.OUT. With the adjustment using the coefficients K7 and K10, the chromaticness and hue of the Ye signal can be adjusted independently from other color signals.
In this conventional example, as apparent from the above-described specific example, if the input signal is composed of only one of the primary and complementary color signals, then the output of the other color signal is 0. Therefore, the above-described operation is not affected in particular. If the input signal is composed of a mixture of both the primary and complementary color signals, the above-described operations are executed independently in parallel.
With this conventional example, a digital tone correction apparatus can be realized which can correct six colors independently by using ten adders/subtractors and four multipliers.
As described above, for tone correction of an R signal, for example, in the chromaticness direction, the primary color component quantity (R-G) multiplied by a specific constant K.sub.r is added to an image signal R.
If the constant K.sub.r is in the range from -1 to +1, this correction does not change a level difference (complementary color components) between the intermediate level and the lowest level and a quantity (white color components) of the lowest level.
For tone correction of a signal Ye in the chromaticness direction, the complementary color component quantity (G-B) multiplied by a specific constant K.sub.y is added to image signals R and G.
Also in this case, if the constant K.sub.y is in the range from -1 to +1, this correction does not change a level difference (primary color components) between the highest level and the intermediate level and a quantity (white color components) of the lowest level.
Therefore, if the constants K.sub.r and K.sub.y are properly selected, correction of the primary color R and the complementary color Ye in the chromaticness direction can be performed independently while preserving the white balance.